{extends 'admin/layout/main.tpl'}

{block title}编辑管理员{/block}
{block smallTitle}创建或编辑管理员。{/block}

{block breadcrumb}
<li>管理员管理</li>
<li><a href="{route('AdminAdminList')}">管理员管理</a></li>
<li><a href="{route('AdminAdminEdit', ['id'=>$data.id])}">编辑管理员</a></li>
{/block}

{block main}
<div class="row">
	<div class="col-lg-12">
		<section class="panel">
			<header class="panel-heading">管理员信息</header>
			<div class="panel-body">
				<form method="post" class="form-horizontal tasi-form" action="">
				{if $data}
					<div class="form-group">
						<label class="col-lg-2 col-sm-2 control-label">#</label>
						<div class="col-lg-10">
							<p class="form-control-static">{$data.id}</p>
						</div>
					</div>
				{/if}
					<div class="form-group">
						<label class="col-sm-2 col-sm-2 control-label">用户名</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="username" value="{Input::old('username', $data.username)|escape}">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 col-sm-2 control-label">密码</label>
						<div class="col-sm-10">
							<input type="password" class="form-control" name="password">
							{if $data}<p class="help-block">不修改密码请留空。</p>{/if}
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 col-sm-2 control-label">确认密码</label>
						<div class="col-sm-10">
							<input type="password" class="form-control" name="password_confirmation">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 col-sm-2 control-label">姓名</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="realname" value="{Input::old('realname', $data.realname)|escape}">
						</div>
					</div>
					<div class="form-group">
						<div class="col-lg-offset-2 col-lg-10">
							<input type="hidden" name="id" value="{$data.id}">
							<button class="btn btn-primary" type="submit">保存</button>
						</div>
					</div>
				</form>
			</div>
		</section>
	</div>
</div>
{/block}
